import request from "@/utils/request";

/**获取列表 */
export function listSubstation(params) {
  return request({
    url: "/zk/substation/list",
    method: "get",
    params: params,
  });
}

/**获取列表 */
export function listSubstationFold(params) {
  return request({
    url: "/zk/substation/listFold",
    method: "get",
    params: params,
  });
}

/**新增变电站 */
export function addSubstation(data) {
  return request({
    url: "/zk/substation",
    method: "post",
    data: data,
  });
}

/**根据num获取变电站信息 */
export function getSubstationByNum(num) {
  return request({
    url: "/zk/substation/" + num,
    method: "get",
  });
}

/**修改变电站 */
export function editSubstation(data) {
  return request({
    url: "/zk/substation",
    method: "put",
    data: data,
  });
}

/**删除变电站 */
export function delSubstation(ids) {
  return request({
    url: "/zk/substation/" + ids,
    method: "delete",
  });
}
